home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
- <background>
- <id>19562</id>
- <filler1>0</filler1>
- <bitmap>BMAP_19781.pbm</bitmap>
- <cantDelete> <true /> </cantDelete>
- <showPict> <true /> </showPict>
- <dontSearch> <false /> </dontSearch>
- <link rel="stylesheet" type="text/css" href="stylesheet_13428.css" />
- <part>
- <id>1</id>
- <type>field</type>
- <visible> <false /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>5</left>
- <top>42</top>
- <right>21</right>
- <bottom>57</bottom>
- </rect>
- <style>transparent</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <textHeight>16</textHeight>
- <name>Total</name>
- <script></script>
- </part>
- <part>
- <id>2</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <false /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>27</left>
- <top>43</top>
- <right>227</right>
- <bottom>60</bottom>
- </rect>
- <style>transparent</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <false /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <textHeight>16</textHeight>
- <name>SeriesName</name>
- <script></script>
- </part>
- <part>
- <id>3</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>280</left>
- <top>44</top>
- <right>350</right>
- <bottom>298</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <true /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>left</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>12</textHeight>
- <name>Names</name>
- <script></script>
- </part>
- <part>
- <id>4</id>
- <type>field</type>
- <visible> <true /> </visible>
- <dontWrap> <false /> </dontWrap>
- <dontSearch> <false /> </dontSearch>
- <sharedText> <false /> </sharedText>
- <fixedLineHeight> <true /> </fixedLineHeight>
- <autoTab> <false /> </autoTab>
- <lockText> <false /> </lockText>
- <rect>
- <left>361</left>
- <top>44</top>
- <right>433</right>
- <bottom>298</bottom>
- </rect>
- <style>rectangle</style>
- <autoSelect> <false /> </autoSelect>
- <showLines> <true /> </showLines>
- <wideMargins> <false /> </wideMargins>
- <multipleLines> <false /> </multipleLines>
- <reservedFamily> 0 </reservedFamily>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>right</textAlign>
- <font>Geneva</font>
- <textSize>9</textSize>
- <textStyle>plain</textStyle>
- <textHeight>12</textHeight>
- <name>Freq</name>
- <script></script>
- </part>
- <part>
- <id>6</id>
- <type>button</type>
- <visible> <true /> </visible>
- <reserved5> 0 </reserved5>
- <reserved4> 0 </reserved4>
- <reserved3> 0 </reserved3>
- <reserved2> 0 </reserved2>
- <reserved1> 0 </reserved1>
- <enabled> <true /> </enabled>
- <rect>
- <left>243</left>
- <top>309</top>
- <right>343</right>
- <bottom>331</bottom>
- </rect>
- <style>roundrect</style>
- <showName> <true /> </showName>
- <highlight> <false /> </highlight>
- <autoHighlight> <true /> </autoHighlight>
- <sharedHighlight> <true /> </sharedHighlight>
- <family>0</family>
- <titleWidth>0</titleWidth>
- <icon>0</icon>
- <textAlign>center</textAlign>
- <font>Chicago</font>
- <textSize>12</textSize>
- <textStyle>plain</textStyle>
- <name>Plot Pie Graph</name>
- <script>on mouseUp
- set cursor to watch
- put empty into bg field Names of card PieGraph
- put empty into bg field Freq of card PieGraph
- clearScreen
-
- if fld SeriesName of cd PieGraph is empty then
- ask "What Series do you want to plot?"
- if it is empty then exit mouseUp
- put it into fld SeriesName
- end if
- put fld SeriesName into nameholder
-
- --draw the pie graph (modified after Apple routine)
-
- put 80 into pieTop
- put 42 into pieLeft
- put 170 into pieDiameter
-
- clearScreen
- reset paint
- choose oval tool
- set lineSize to 2
- set dragSpeed to 0
- set pattern to 12
- drag from pieLeft,pieTop to pieLeft+pieDiameter, pieTop+pieDiameter
- set centered to false
-
- put the number of lines in field "Freq" into dataCount
- put zero into total
- repeat with i = 1 to dataCount
- add line i of field "Freq" to total
- end repeat
-
- put pieDiameter div 2 into pieRadius
- put pieLeft+pieRadius into pieCenterX
- put pieTop+pieRadius into pieCenterY
-
- choose line tool
- put zero into angle
- put zero into change
- repeat with i = 1 to dataCount+1
- put pieCenterX + round(pieRadius * sin(angle)) into x
- put pieCenterY - round(pieRadius * cos(angle)) into y
- choose line tool
- set pattern to 12
- drag from pieCenterX,pieCenterY to x,y
- if change > .04 then
- set pattern to getPattern(i)
- choose bucket tool
- click at halfX, halfY
- end if
-
- get line i of field "Freq"
- put pi * it / total into change
- add change to angle
- put pieCenterX + round((pieRadius-3) * sin(angle)) into halfX
- put pieCenterY - round((pieRadius-3) * cos(angle)) into halfY
- add change to angle
-
- end repeat
- reset paint
- choose browse tool
- set cursor to hand
- unlock Screen
-
- end mouseUp
-
- function getPattern selector
- return item (selector mod 12)+1 of "2,13,11,3,14,6,21,17,31,18,4,32"
- end getPattern
-
- </script>
- </part>
- <name>PieBg</name>
- <script></script>
- </background>
-